export const formatData = data => {
    let newData = JSON.parse(JSON.stringify(data));
    for(let i of newData){
        i.title = i.name;
        i.children = [];
        i.loading = false;
        i.checked = true;
    }
    return newData;
}
//获取被选中的节点的资源ID
export const getNodesArr = data => {
    let arr = [];
    for(let i of data){
        arr.push(i.id)
    }
    return arr;
}